package com.xh.bussiness.tiku.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xh.bussiness.tiku.service.IExamPointService;
import com.xh.core.bean.AjaxResult;
import com.xh.core.constant.AjaxResultConstant;
import com.xh.core.controller.BaseController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 *
 * @author jqm
 * @since 2019/9/11
 */
@Api(tags="考点接口")
@RestController
@RequestMapping("/tiku/examPoint")
public class ExamPointController  extends BaseController {

    @Autowired
    private IExamPointService examPointService;
//    /**
//     * 分页查询
//     */
//    @ApiOperation(value = "教材分页查询", notes = "教材分页查询")
//    @PostMapping("/queryPage")
//    public XhPage queryPage(XhPage page, BookChapterRequest request) {
//        return bookChapterService.queryBookChapterPage(page,request);
//    }

    /**
     * 数据查询
     * @param request
     * @return
     * @throws Exception 
     */
    @ApiOperation(value="查询所有考点", notes = "查询所有考点")
    @ApiImplicitParams({
        @ApiImplicitParam(dataType="String",name="subject",value="学科", required = true)
    })
    @PostMapping("/queryAll")
    public AjaxResult queryAll(String subject) throws Exception {
        return new AjaxResult(AjaxResultConstant.Result.SUCCESS,examPointService.queryAll(subject));
    }


}
